return false;
},
+ itemActivated: function(animate) {
+ if (animate == undefined)
+ animate = BoxPointer.PopupAnimation.FULL;
+
+ this._getTopMenu().close(animate);
+ },
+
/**
* _connectSubMenuSignals:
* @object: a menu item, or a menu section
}));
menuItem._activateId = menuItem.connect('activate', Lang.bind(this, function (menuItem, event) {
this.emit('activate', menuItem);
- this.close(BoxPointer.PopupAnimation.FULL);
+ this.itemActivated(BoxPointer.PopupAnimation.FULL);
}));
// the weird name is to avoid a conflict with some random property
// the menuItem may have, called destroyId
},
_onLockScreenActivate: function() {
- this.menu.close(BoxPointer.PopupAnimation.NONE);
+ this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
Main.overview.hide();
Main.screenShield.lock(true);
},
_onLoginScreenActivate: function() {
- this.menu.close(BoxPointer.PopupAnimation.NONE);
+ this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
Main.overview.hide();
if (Main.screenShield)
Main.screenShield.lock(false);
this._session.ShutdownRemote();
}));
} else {
- this.menu.close(BoxPointer.PopupAnimation.NONE);
+ this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._loginManager.suspend();
}
}